home *** CD-ROM | disk | FTP | other *** search
-
-
-
- Tcl_AppInit(3) Tcl Library Procedures 7.0
-
-
-
- _________________________________________________________________
-
- NAME
- Tcl_AppInit - Perform application-specific initialization
-
- SYNOPSIS
- #include <tcl.h>
-
- Tcl_AppInit(_i_n_t_e_r_p)
-
- ARGUMENTS
- Tcl_Interp *_i_n_t_e_r_p (in) Interpreter for the appli-
- cation.
- _________________________________________________________________
-
-
- DESCRIPTION
- Tcl_AppInit is a procedure that is invoked by the main pro-
- grams for Tcl applications such as tclsh and wish. Its pur-
- pose is to allow new Tcl applications to be created without
- modifying existing main programs such as those for tclsh and
- wish. To create a new application simply write a new ver-
- sion of Tcl_AppInit to replace the default version provided
- by Tcl, then link your new Tcl_AppInit with the Tcl library,
- which contains the main program from tclsh (be sure to
- specify the switch ``-u _main'' to the linker to force it to
- use the version of main from the Tcl library).
-
- Tcl_AppInit is invoked after other initialization in main
- and before entering the main loop to process commands. Here
- are some examples of things that Tcl_AppInit might do:
-
- [1] Call initialization procedures for various packages
- used by the application. Each initialization procedure
- adds new commands to _i_n_t_e_r_p for its package and per-
- forms other package-specific initialization.
-
- [2] Process command-line arguments, which can be accessed
- from the Tcl variables argv and argv0 in _i_n_t_e_r_p.
-
- [3] Invoke a startup script to initialize the application.
-
-
- KEYWORDS
- application, argument, command, initialization, interpreter
-
-
-
-
-
-
-
-
-
-
- Tcl 1
-
-
-
-